import urllib.request
import os, sys

def main2(a1):
    s3 = a1.split(" : ", 1)
    s4 = s3[0].replace('/', '').replace('\\', '')
    while os.path.exists(s4+".ppt"):
        s4 = s4+"."
    urllib.request.urlretrieve(s3[1], s4+".ppt")

def main(a1):
    with open(a1, mode="r", encoding="utf8") as s1:
        s2 = s1.readlines()
        for i in s2:
            main2(i)

if __name__ == "__main__":
    if not len(sys.argv) <2:
        main(*sys.argv[1:])
    else:
        print("With the help of <https://github.com/LiuDianshi/Icourses-Videos-and-PPTs-Download>")
        print("File format:")
        print("\t0-1定量变量的统计描述 : https://resx.icourses.cn/share/process21/pdf/201 ... a3bbf73.pdf")
